package com.manor.paradise.fragment

import android.content.Context
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.webkit.WebSettings
import androidx.fragment.app.Fragment
import com.manor.paradise.R
import com.manor.paradise.activity.ExplainActivity
import kotlinx.android.synthetic.main.activity_explain.*

/**
 * 规则说明
 * @property mCurView View?
 * @constructor
 */
class RuleDescriptionFragment : Fragment() {
    var mCurView: View? = null

    companion object {
        fun newInstance(): RuleDescriptionFragment {
            return RuleDescriptionFragment()
        }
    }

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                              savedInstanceState: Bundle?): View? {
        mCurView = inflater.inflate(R.layout.fragment_employment_records, container, false)
        return mCurView
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        web_view.setBackgroundColor(0)
        web_view.settings.cacheMode = WebSettings.LOAD_NO_CACHE
        web_view.loadUrl(ExplainActivity.RULE_DESCRIPTION)
    }

}